package com.sz.lk.wingsystem.mvp;


import com.sz.lk.wingsystem.bean.LoginResult;
import com.sz.lk.wingsystem.bean.ManualResult;
import com.sz.lk.wingsystem.bean.TaskResult;
import com.sz.lk.wingsystem.bean.TaskReturnResult;
import com.sz.lk.wingsystem.bean.WeightResult;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * @作者 liuke
 * @创建日期 2018/12/19 14:11
 * @Email 1012459343@qq.com
 * Description:请求方法
 */

public interface APIService {

    @FormUrlEncoded
    @Headers({"mmsp-chnl-id: mmsp", "mmsp-chnl-pwd: 123456"})//需要添加头
    @POST("bankmarketServer/cust/face")
    Call<ResponseBody> getMessage2(@Field("pic") String pic,
                                   @Field("fIdNo") String fIdNo);   // 请求体味RequestBody 类型


    @GET("WMSTask/LoadTaskInfoByCode")
    Observable<TaskResult> LoadTaskInfoByCode(@Query("code") String code);

    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST("User/Login")
    Observable<LoginResult> login(@Body RequestBody info);

    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST("Weight/WeighCartonNo")
    Observable<WeightResult> WeighCartonNo(@Body RequestBody info);

    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST("Weight/ManualNewReportInfo")
    Observable<ManualResult> ManualNewReportInfo(@Body RequestBody info);

    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST("WMSTask/UploadTaskInfo")
    Observable<TaskReturnResult> UploadTaskInfo(@Body RequestBody info);
}
